import { StyleSheet } from "react-native";
import { lightTheme } from "@/styles/light.style"; // 导入以获取类型提示

type ThemeColors = typeof lightTheme;

export const getStyles = (colors: ThemeColors) =>
  StyleSheet.create({
    searchContainer: {
      marginBottom: 20,
    },
    searchSection: {
      flexDirection: "row",
      alignItems: "center",
      backgroundColor: colors.inputBackground,
      borderRadius: 10,
      paddingHorizontal: 10,
      marginBottom: 20,
    },
    searchIcon: {
      marginRight: 10,
    },
    input: {
      flex: 1,
      height: 48,
      fontSize: 16,
      color: colors.text.primary,
    },
    searchButton: {
      backgroundColor: colors.button.primary,
      padding: 15,
      borderRadius: 10,
      alignItems: "center",
    },
    searchButtonText: {
      color: colors.button.primaryText,
      fontSize: 16,
      fontWeight: "bold",
    },
    loadingContainer: {
      flex: 1,
      justifyContent: "center",
      alignItems: "center",
    },
    errorText: {
      marginTop: 20,
      color: colors.status.error,
      textAlign: "center",
    },
    resultContainer: {
      marginTop: 20,
    },
  });
